import { ApiProperty } from '@nestjs/swagger'
import { IsEmail, IsNotEmpty } from 'class-validator'

/**
 * @description 用户登录 dto
 * @author LI
 * @date 2020-11-12 13:09
 */

export class LoginUserDto {
  @ApiProperty({ description: '登录邮箱', example: 'Sean.li@71360.com' })
  @IsNotEmpty({ message: '邮箱不能为空' })
  @IsEmail({}, { message: '邮箱格式不正确' })
  loginEmail: string

  @ApiProperty({ description: '登录密码', example: '123456' })
  @IsNotEmpty({ message: '密码不能为空' })
  password: string
}